package com.wanxi.test;

public class SumEven {
    public static void main(String[] args) {
        /**
         * 1.初始化 1
         * 2.结束100
         * 3.偶数 控制语句+2
         * 4.打印
         */
//        for (int i = 2; i <= 100; i += 2) {
//            System.out.println(i);
//        }
        int sum = 0;
        for (int i = 1; i <= 100; i++) {
            if (i % 2 == 0) {
//                System.out.println(i);
                sum+=i;
            }
        }
        System.out.println(sum);
    }
}
